package valid

type ValidNode struct {
	hasFormat bool
	next      bool
	Check     func(d string) bool
	Format    func(d string) string
}

type ValidLine = []ValidNode

var TimeValidLine = ValidLine{
	ValidNode{true, true, Not(IsSpace), FormatTrimSpace},
	ValidNode{true, true, Not(IsEnter), FormatEnter},
	ValidNode{true, true, IsTimeLevel2, FormatTimeLevel2},
}

var TimeValidLine2 = ValidLine{
	ValidNode{true, false, IsTimeLevel5, FormatTimeLevel5},
}

var TimeValidLine3 = ValidLine{
	ValidNode{true, true, IsTimeLevel6, FormatTimeLevel6},
}

var CnValidLine = ValidLine{
	ValidNode{false, false, IsCn, FormatEmpty},
}

var URLValidLine = ValidLine{
	ValidNode{false, false, IsURL, FormatEmpty},
}

var URLRecordNoValidLine = ValidLine{
	ValidNode{false, false, IsURLRecordNo, FormatEmpty},
}

var MonyValidLine = ValidLine{
	ValidNode{false, false, IsMony, FormatEmpty},
}
